Question: $f(x) = \begin{cases} -6x+6 & \text{for} ~~~~x\lt1 \\ \sin(\pi x) & \text{for} ~~~~ x \geq1\end{cases}$ Evaluate the definite integral. $\int^3_{0}f(x)\,dx = $ Choose 1 answer: Choose 1 answer: (Choice A) A $-3+\dfrac2\pi$ (Choice B) B $6-\dfrac2\pi$ (Choice C) C $3$ (Choice D) D $\dfrac2\pi$
Solution: Splitting up the definite integral Since we're working with a piecewise function, we need to split the definite integral up into two pieces: $\phantom{=} \int^3_{0}f(x)\,dx$ $= \int^1_{0}f(x)\,dx + \int^3_{1}f(x)\,dx~~~~~~$ [Why did we split at 1?] $= \int^1_{0}(-6x+6)\,dx + \int^3_{1}\sin(\pi x)\,dx ~~~~~~$ Evaluating each piece Next, let's evaluate each of these definite integrals one at a time. The first definite integral: $\begin{aligned} \int^1_{0}(-6x+6)\,dx~ &=-3x^2 + 6x\Bigg|^1_{{0}} \\\\ &= \left[-3 ( 1)^2 + 6\cdot(1) \right] - \left[-3({0})^2 + 6\cdot({0}) \right] \\\\ &= \left[3\right] -\left[0 \right] \\\\ &= {3}\end{aligned}$ The second definite integral: $\begin{aligned} \int^3_{1}\sin(\pi x)\,dx~ &=-\dfrac{\cos(\pi x)}{\pi}\Bigg|^3_{{1}} \\\\ &= \left[-\dfrac{\cos(\pi \cdot 3)}{\pi}\right] - \left[-\dfrac{\cos(\pi \cdot 1)}{\pi}\right] \\\\ &= \left[-\dfrac{\cos(3\pi)}{\pi}\right] - \left[-\dfrac{\cos(\pi)}{\pi}\right] \\\\ &=\left [\dfrac1\pi\right] - \left [\dfrac1\pi\right] \\\\ &= {0}\end{aligned}$ Putting the pieces together Now let's add these two pieces together to find the answer: $\phantom{=} \int^1_{0}(-6x+6)\,dx + \int^3_{1}\sin(\pi x)\,dx$ $ = {3} + {0}$ $ = 3$ The answer $\int^3_{0}f(x)\,dx = 3$